import { Breadcrumb } from 'antd';
import {
    RobotOutlined
} from '@ant-design/icons';
export default (props) => {
    // console.log(props, 'props');
    const { currentRoute, router } = props
    const { children: routes } = props.currentRoute
    return <Breadcrumb className="h-5 leading-5" separator=">">
    {/* <Breadcrumb.Item>
        {currentRoute.meta.icon ? currentRoute.meta.icon : null}
    </Breadcrumb.Item> */}
    <Breadcrumb.Item href={currentRoute.path}>
        <span>{currentRoute.meta.title}</span>
    </Breadcrumb.Item>
    {routes ? routes.filter(el => el.path === router.pathname).map(el => <Breadcrumb.Item disabled key={el.path}>
        <span>{el.meta.title}</span>
    </Breadcrumb.Item>) : null}
    </Breadcrumb>
}